package routers

import (
	"SalesMangent/middlepiece"

	"github.com/gin-gonic/gin"
)

func sysNoCheckRoleRouter(r *gin.RouterGroup) {
	r = r.Group("/apis")
	clientrouter(r)
	loginRouter(r)
	factoryrouter(r)
	iventoryrouter(r)
	o_messagerouter(r)
	o_detailrouter(r)
}

func InitRouter() *gin.Engine {
	r := gin.New()
	r.Use(middlepiece.Cors())
	g := r.Group("/Data")

	sysNoCheckRoleRouter(g)

	return r
}
